<include file='Common:header' />
<link rel="stylesheet"
	href="__PUBLIC__/Css/bootstrap-datetimepicker.min.css">
</head>
<body>
	<include file='Common:nav' />
	<div id="wrap">
		<div class="container" id="page-main">
			<div class="row">
				<div class='col-xs-12 col-sm-6 col-md-8'>
					<div class='box'>
						<div class='cell'>
							<span class="chevron">››&nbsp;</span>
							{$activity.title}
							<span style="float:right">
								已报名{$activity.totalNum}人&nbsp;&nbsp;
								<?php if($_SESSION['role'] == '3'): ?>
									<a href="{:U('Activity/edit',array('id'=>$activity['id']))}" >编辑活动</a>
								<?php endif; ?>
							</span> 
						</div>
						<div class='inner'>
							<form class="form-horizontal" id="act_view"
								novalidate="novalidate">
								<input type="hidden" id="id" name="id" value="{$activity.id}" />
								<div class="form-group">
									<label class="col-sm-2 control-label">时间</label>
									<div class="col-sm-7">
										<p class='form-control-static'>{$activity.startTime}--{$activity.endTime}
										</p>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">地点</label>
									<div class="col-sm-7">
										<p class='form-control-static'>{$activity.address}</p>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">限报</label>
									<div class="col-sm-7">
										<p class='form-control-static'>{$activity.maxNum}</p>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">详情</label>
									<div class="col-sm-7">
										<p class='form-control-static'>{$activity.detail}</p>
									</div>
								</div>
								<hr class="hrline" />
								<div class="form-group">
									<label class="col-sm-2 control-label">已报名</label>
									<div class="col-sm-7">
										<p id='signUsers' class='form-control-static'>
											{$activity.signUsers}
											</br>
											共&nbsp;{$activity.totalNum}&nbsp;人
										</p>
									</div>
								</div>
								<div class='form-group'>
									<div class="col-sm-offset-3 col-sm-9">
										</br> 
										<span id="btn_sign" class="btn btn-primary">报名</span> 
										<span id="btn_signMore" class="btn btn-primary">带人报名</span> 
										<span id="btn_undo" class="btn btn-primary">取消报名</span>
									</div>
								</div>
								
							</form>
					        <div id='div_sign_more' style="display:none">
					          <div class="panel panel-default">
					            <div class="panel-heading">带人报名</div>
					            <div class="panel-body">
					              	<form class="form-horizontal" novalidate="novalidate">
										<div class="form-group">
											<label class="col-sm-3 control-label" for="signName">报名称呼</label>
											<div class="col-sm-7">
												<input autofocus="autofocus" class="form-control"
													id="signName" name="signName" size="50" type="text"
													value="" />
											</div>
										</div>
										<div class="form-group">
											<label class="col-sm-3 control-label" for="signNum">报名人数</label>
											<div class="col-sm-7">
												<div class="row">
													<div class="col-xs-5">
														<p class='form-control-static'>连我在内有</p>
													</div>
													<div class="col-xs-3">
														<input autofocus="autofocus" class="form-control"
														id="signNum" name="signNum" size="50" type="text"
														value="2" />
													</div>
													<div class="col-xs-4">
														<p class='form-control-static'>人参加</p>
													</div>
												</div>
											</div>
										</div>
										<div class='form-group'>
											<div class="col-sm-offset-3 col-sm-9">
												</br> 
												<span id="dlg_btn_signMore" class="btn btn-primary">提交报名</span>
							        			<span id="dlg_btn_signMore_undo" class="btn btn-default">取消</span>
											</div>
										</div>
									</form>
									
					            </div>
					          </div>
					        </div>
						</div>
					</div>

				</div>
				<div class='col-xs-12 col-sm-6 col-md-4' id='Rightbar'>
					<div class="box">
						<div class="cell">活动报名说明</div>
						<div class="inner">
							<h5>1、登陆用户才能报名</h5>
							<h5>2、如果只给自己报名，点击报名按钮即可</h5>
							<h5>3、点击取消报名会取消自己所有的报名，包括代报名的人</h5>
							<h5>4、点击带人报名，可以给自己和他人一起报名，请在弹出框中输入报名的称呼和人数</h5>
							<h5>5、如果需要修改报名信息，可以再点击带人报名，在弹出框中输入新的报名称呼和人数，新的报名信息会覆盖旧信息</h5>
						</div>
					</div>
				</div>
			</div>
			<include file='Common:footer'/>
		</div>
	</div>
	<include file='Common:inc_js' />
	<script type="text/javascript">
		var signUrl='{:U('sign')}';
		var signMoreUrl='{:U('signMore')}';
		var undoUrl='{:U('undo')}';
		var uid='{$Think.session.uid}';
		var uname='{$Think.session.uname}';
		var actId='{$activity.id}';
		var totalSignNum={$activity.totalNum};
		var signUsers='{$activity.signUsers}';
		var maxNum='{$activity.maxNum}';
		var startTime=new Date('{$activity.wholeStartTime}'.replace("-", "/").replace("-", "/")); 
		var endTime=new Date('{$activity.wholeEndTime}'.replace("-", "/").replace("-", "/"));
	</script>
	<script type="text/javascript" src='__PUBLIC__/Js/act_view.js'></script>
</body>
</html>

